import 'package:flutter/material.dart';

Widget demoItem(IconData icon, String text) {
  return Expanded(
    flex: 10,
    child: Center(
      child: Row(
        mainAxisAlignment: MainAxisAlignment.center, //横向居中
        mainAxisSize: MainAxisSize.max, //大小按照最大充满
        crossAxisAlignment: CrossAxisAlignment.center, //竖向居中
        children: [
          Icon(icon, size: 16.0, color: Colors.grey),
          Padding(padding: EdgeInsets.only(left: 5.0)),
          Text(text,
              style: TextStyle(
                  color: Colors.grey,
                  fontSize: 14.0,
                  fontWeight: FontWeight.bold),
              overflow: TextOverflow.ellipsis,
              maxLines: 1),
        ],
      ),
    ),
  );
}